﻿using System.Collections.Generic;
using System.Linq;
using Pyramid.Models;

namespace Pyramid.Bll
{
	public class RoleHelper : BllBase
	{
		public static RoleHelper NewInstance
		{
			get { return new RoleHelper(); }
		}

		public IEnumerable<Role> GetRolesByUserType(UserTypes userType)
		{
			return Db.Roles.ToList().Where(x => ((UserTypes) x.UserTypes & userType) == userType);
		}
	}
}